package com.retail.bbq.cola.service;

import com.retail.bbq.cola.entity.WechatCustomer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.retail.bbq.cola.vo.ResultVO;
import com.retail.bbq.cola.vo.request.SaveUserInfoRequest;
import org.jetbrains.annotations.NotNull;

import javax.servlet.http.HttpServletRequest;

/**
* @author jarvis.zhang
* @description 针对表【wechat_customer(顾客微信小程序用户表)】的数据库操作Service
* @createDate 2025-06-04 11:18:17
*/
public interface WechatCustomerService extends IService<WechatCustomer> {

    ResultVO<?> userLoginNoCache(HttpServletRequest request,
                                 String buCode,
                                 String code,
                                 String source,
                                 String oneid,
                                 String encryptMobile);

    ResultVO<?> userInfoSaveOrUpdate(SaveUserInfoRequest request);

    WechatCustomer getUserInfo(String openId, String oneid, String lawsonId);

    WechatCustomer getUserInfoOrDefault(String oneid, String lawsonId);

    @NotNull
    WechatCustomer userInfoSaveOrUpdate(SaveUserInfoRequest request, String redisKey);

    WechatCustomer getUserInfo(String oneId);

}
